package com.git.bds.mr.patient.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 成大事
 * @since 2022/9/23 18:34
 */
@Data
public class PatientDTO implements Serializable {

    @NotNull
    @ApiModelProperty("id")
    private Long id;

    @NotNull
    @NotBlank(message = "id不能为空")
    @ApiModelProperty("姓名")
    private String realName;

    @ApiModelProperty("0：M；1：W")
    private Integer sex;

    @NotNull
    @Min(value = 0,message = "年龄不能小于0岁")
    @Max(value = 120,message = "年龄不能大于120岁")
    @ApiModelProperty("年龄")
    private Integer age;

    @NotNull
    @NotBlank(message = "身份证号不能为空")
    @ApiModelProperty("身份证号")
    private String idCard;
}
